home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / pd / magicwb / update drawers < prev    next >
Text File  |  1996-05-20  |  5KB  |  131 lines

  1. failat 21
  2.  
  3. if not exists XEN-Icons
  4.   echo "*n Please change current directory to that of MagicWB *n or start the installation from the Workbench!*n"
  5.   quit
  6. endif
  7.  
  8. echo "*n*e[1;32m ____________________________________________________________________"
  9. echo " *e[43m                                                                    *e[0m"
  10. echo " *e[0;32;43m              Welcome to MagicWB v1.0: UPDATE DRAWERS*e[1m               *e[0m"
  11. echo " *e[1;4;43m                                                                    *e[0m"
  12. echo "*n*n This small installation was written to provide you with the most"
  13. echo " comfortable way to replace the old Drawer-Icons with the new ones"
  14. echo " of *e[32mMagicWB*e[0m."
  15. echo " *n This installation should be started AFTER the main installation"
  16. echo " was done IF you still find any old drawers on your Workbench! As"
  17. echo " the main installation only updates the drawers in your SYS-Directory"
  18. echo " there might be the possibility that you still do have old drawers"
  19. echo " in other directories."
  20. echo " *n If you have found old drawers on your Workbench, please remember"
  21. echo " the PATH where they are located to provide this installation with" 
  22. echo " the exact path so that it can update these drawers."
  23. echo noline "*n*n Start the Drawer-Update? "
  24.  
  25. set > nil: InpVar ?
  26.  
  27. if $InpVar eq "ja"
  28.   skip Start
  29. endif
  30.  
  31. if $InpVar eq "j"
  32.   skip Start
  33. endif
  34.  
  35. if $InpVar eq "y"
  36.   skip Start
  37. endif
  38.  
  39. if $InpVar eq "yes"
  40.   skip Start
  41. endif
  42.  
  43. echo noline "*n*e[32m Update aborted."
  44. quit
  45.  
  46. lab Start
  47. echo "*e[1;1H*e[J"
  48. echo "*n You can decide now if you want to update the drawers ONLY"
  49. echo " IN THE DIRECTORY of the given path (= Normal mode) or INCLUDING"
  50. echo " ALL SUB-DIRECTORIES of the given path (= Recursive mode).*n"
  51. echo " If you want to do it in the normal mode enter N."
  52. echo " If you want to do it recursively enter R."
  53. echo noline "*n Which mode do you prefer? "
  54. set Mode [Return]
  55. set > NIL: Mode ?
  56. if $Mode eq "N"
  57.   skip PathN
  58. endif
  59. if $Mode eq "R"
  60.   skip PathR
  61. endif
  62. echo "*n You have not selected the correct mode! Please try again..."
  63. wait 4
  64. skip back Start
  65.  
  66. lab PathN
  67. echo noline "*n*n*N Please enter the PATH where old Drawer-Icons are located: "
  68. set > NIL: Path ?
  69.   if > NIL: not exists $Path
  70.     echo " Wrong path, `$path' does not exist! Try again...*n"
  71.     skip back PathN
  72.   endif
  73. echo noline "*n Updating Drawer-Icons in $Path ..."
  74. list > ram:MWB $Path dirs lformat "if exists %s%s.info *ncopy > NIL: XEN-Icons/Prefs/Env-Archive/Sys/def_Drawer.info TO %s%s.info *nendif*n"
  75. execute > NIL: ram:MWB
  76. delete > NIL: ram:MWB
  77. echo "....*e[33mDONE*e[0m"
  78. echo "*n*n*e[32m Drawer-Update successfully finished!*e[0m"
  79. skip prefs
  80.  
  81. lab PathR
  82. echo noline "*n*n*N Please enter the PATH where old Drawer-Icons are located: "
  83. set > NIL: Path ?
  84.   if > NIL: not exists $Path
  85.     echo " Wrong path, `$path' does not exist! Try again...*n"
  86.     skip back PathR
  87.   endif
  88. echo noline "*n Recursively updating Drawer-Icons in $Path ..."
  89. list > ram:MWB $Path dirs all lformat "if exists %s%s.info *ncopy > NIL: XEN-Icons/Prefs/Env-Archive/Sys/def_Drawer.info TO %s%s.info *nendif*n"
  90. execute > NIL: ram:MWB
  91. echo "....*e[33mDONE*e[0m"
  92. echo "*n*n*e[32m Drawer-Update successfully finished!*e[0m"
  93.  
  94. lab prefs
  95. list > RAM:MWB SYS:Prefs.info lformat "%L"
  96. search >NIL: RAM:MWB 2658
  97. if not warn
  98.   wait 3
  99.   echo "*e[1;1H*e[J"
  100.   echo "*n*n Unfortunately you updated the drawers in your SYS-Directory!"
  101.   echo " As I told you at the beginning, this had already been done by the"
  102.   echo " main installation. Because you did this for a second time now,"
  103.   echo " the previously installed Prefs-Icon has been overwritten and been"
  104.   echo " replaced by a boring Drawer-Icon. But don't worry:*n"
  105.   echo " You can now decide (again) which type of Prefs-Icon you want to be"
  106.   echo " installed to your SYS-Directory. Please type either *"SMALL*" or"
  107.   echo " *"BIG*" in the following request..."
  108.   lab Retry
  109.   echo noline "*n Which type of Prefs-Icon should be installed? "
  110.   set > NIL: Prefs ?
  111.   if $Prefs eq "SMALL"
  112.     Echo noline " Installing SMALL Prefs-Icon..."
  113.     copy > NIL: XEN-Icons/SPECIAL/Prefs.info TO SYS:
  114.     echo "..*e[33mDONE*e[0m"
  115.   else
  116.     if $Prefs eq "BIG"
  117.       Echo noline " Installing BIG Prefs-Icon..."
  118.       copy > NIL: XEN-Icons/SPECIAL/Prefs2.info TO SYS:Prefs.info
  119.       echo "..*e[33mDONE*e[0m"
  120.       skip OK
  121.     endif
  122.   echo " You MUST enter either *"SMALL*" or *"BIG*"! Try again..."
  123.   skip back Retry
  124.   endif
  125.   lab OK
  126.   echo "*n*n*e[32m Everything is OK now. Bye!"
  127. endif
  128.  
  129. delete > NIL: ram:MWB
  130. wait 4
  131. quit